package com.pratik.android.smssniffer.handlers.impl;

import com.pratik.android.smssniffer.handlers.CommandHandlerService;
import com.pratik.android.smssniffer.handlers.MessageHandlerService;


public class HandlersServiceRegistry {
	
    private static HandlersServiceRegistry instance;
    
    public static HandlersServiceRegistry getInstance(){
    	if(instance == null) {
    		return  instance = new HandlersServiceRegistry();
    	}
    	return instance;
    }
    
    private boolean init = false;
    
    private MessageHandlerService messageHandlerService;
    private CommandHandlerService commandHandlerService;
    
    public void init(){
    	if(init)return;
    	
    	messageHandlerService = new MessageHandlerServiceImpl();
    	commandHandlerService = new CommandHandlerServiceImpl();
    	
    	init = true;
    }
    
    public MessageHandlerService getMessageHandlerService(){
    	return messageHandlerService;
    }
    
    public CommandHandlerService getCommandHandlerService(){
    	return commandHandlerService;
    }
    
}
